package com.you.learning.jvm.ygc;

/**
 * @Description
 * @Author yough
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2021/1/29
 */
public class YgcDemo3 {
    public static void main(String[] args) {
        /**
         * JVM参数设置，模拟大对象直接进入老年代
         * -XX:NewSize=10m
         * -XX:MaxNewSize=10m
         * -XX:InitialHeapSize=20m
         * -XX:MaxHeapSize=20m
         * -XX:SurvivorRatio=8
         * -XX:MaxTenuringThreshold=15
         * -XX:PretenureSizeThreshold=9m
         * -XX:+UseParNewGC
         * -XX:+UseConcMarkSweepGC
         * -XX:+PrintGCDetails
         * -XX:+PrintGCTimeStamps
         * -Xloggc:gc.log
         */
        byte[] array1 = new byte[9 * 1024 * 1024];
    }
}
